import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import CreateArticle from '../views/CreateActicle.vue'
import ListArticle from '../views/ListArticle.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    // component:Home
    redirect: '/article/index'
  },
  {
    path: '/article/create',
    name: 'CreateArticle',
    component: () => import(/* webpackChunkName: "about" */ '../views/CreateActicle.vue')
  },
  {
    path: '/article/index',
    name: 'ListArticle',
    component: ListArticle
  }
]

const router = new VueRouter({
  routes
})

export default router
